package com.ruoyi.system.mapper.app;

import com.ruoyi.system.domain.app.RechargeOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface RechargeOrderMapper {
    int deleteByPrimaryKey(Long id);

    int insert(RechargeOrder record);

    int insertSelective(RechargeOrder record);

    List<Map> rechargeCurve(@Param("month")String month,@Param("operatorId")Long operatorId,
                            @Param("communityId")Long communityId);

    Map dayOrderCount(@Param("type") Integer type,@Param("userId")Long userId);

    List<Map> deviceUseRank(@Param("communityId")Long communityId,@Param("userId")Long userId,
                            @Param("month")String month);

    Map consumptionPie(@Param("userId")Long userId,
                       @Param("month")String month);

    List<Map> orderCountLine(@Param("month")Integer month,@Param("userId")Long userId);

    Map indexData(Long userId);

    RechargeOrder selectByPrimaryKey(Long id);

    RechargeOrder selectByOrderCharge(Long userId);

    RechargeOrder selectBySpace(@Param("deviceId")Long deviceId,@Param("deviceSpace")String spaceNum);

    RechargeOrder selectBySpaceState(@Param("deviceId")Long deviceId,@Param("deviceSpace")String spaceNum);

    RechargeOrder selectByOrderNo(String orderNo);

    List<RechargeOrder> rechargeList(@Param("userId")Long userId,@Param("orderId") Long orderId);

    List<RechargeOrder> rechargeListAdmin(@Param("order")RechargeOrder rechargeOrder,@Param("startTime") String startTime ,@Param("endTime") String endTime);

    int updateByPrimaryKeySelective(RechargeOrder record);

    int updateByPrimaryKey(RechargeOrder record);
}